﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    class Animal
    {
        public int Leg;
        //public int Leg
        //{
        //    get { return this.Leg; }
        //    set {this.Leg=value; }
        //}
        public void Eat()
        {
            Console.WriteLine("他能吃");
        }
        public void Look()
        {
            Console.WriteLine("他能看");
        }
        public void Walk()
        {
            Console.WriteLine("他能走");
        }
        public void Sleep()
        {
            Console.WriteLine("他能睡");
        }
        public virtual void cry()
        {
            Console.WriteLine("他可以叫");
        }
        }
    class PetStore
    {
        public void ConsignAnimal(Animal a)
        {
            //寄养宠物
            a.Eat();
            a.Look();
            a.Walk();
            a.Sleep();
            a.cry();
        }
    }
}
